<?php
/**mzj接口路由*/
Route::any('',function(){
    return 'hello world!';
});

Route::group(['prefix'=>'Api'],function(){
    Route::group(['namespace'=>'login'],function (){
        Route::post('login','LoginController@CheckIsLogin');//登陆处理
        Route::post('register','LoginController@IsUserPhoneRegister');//注册处理
        /**用户登陆注册,不需要登陆的访问路由*/
        Route::get('/code','LoginController@code');
    });
    /**短信服务校验*/
    Route::post('/checkcode','MscodeController@checkcode');
    //获取验证码
    Route::post('/mscode','MscodeController@mscode');
    //首页
    Route::group(['prefix'=>'index'],function(){
        Route::get('/index','IndexController@index');
    });
    //家具
    Route::group(['prefix'=>'fitment'],function(){
        Route::get('/list','FitmentController@fitment_list');
        Route::get('/detail','FitmentController@fitment_detail');
        Route::get('/cate','FitmentController@cate');//家具分类名
        Route::get('/subcate','FitmentController@fitment_subcate_list');//家具分类子分类列表
    });
    //购物流程
    Route::group(['prefix'=>'shopcar'],function(){
        Route::get('/list','ShopCarController@shopcar_list');
        Route::post('/edit','ShopCarController@shopcar_edit');//新增和编辑
        Route::get('/destroy','ShopCarController@shopcar_destroy');
        Route::post('/finish','ShopCarController@shopcar_finish');//结算购物车
    });
    //账单管理
    Route::group(['prefix'=>'bill'],function(){
        Route::get('/list','BillController@bill_list');
    });
    //文件管理
    Route::group(['prefix'=>'file'],function(){
        Route::post('/upload','FileController@file_upload');
    });
    Route::group(['prefix'=>'extra'],function(){
        Route::post('/interior','ExtraController@interior');
        Route::post('/customized','ExtraController@customized');
        Route::post('/moveservice','ExtraController@moverservice');
    });
    //用户
    Route::group(['prefix'=>'user'],function (){
        Route::get('/resetPassword','UserController@ForgetUserPasswd');
        //登录
        Route::post('/CheckIsLogin','UserController@CheckIsLogin');
        //发送短信
        Route::post('/CommonSendCode','UserController@CommonSendCode');
        //注册保存
        Route::post('/IsUserPhoneRegister','UserController@IsUserPhoneRegister');
        //找回密码
        Route::post('/ForgetUserPasswd','UserController@ForgetUserPasswd');
        //个人信息
        Route::post('/PersonInfo','UserController@PersonInfo');
        //修改密码
        Route::post('/SaveUserPasswd','UserController@SaveUserPasswd');
        //修改昵称
        Route::post('/SaveUserNickName','UserController@SaveUserNickName');
        //修改邮箱
        Route::post('/SaveUserEmail','UserController@SaveUserEmail');
        //修改头像
        Route::post('/SaveUserAvator','UserController@SaveUserAvator');
        //提升额度审核状态
        Route::post('/ApplyQuotaMessageCheckStatus','UserController@ApplyQuotaMessageCheckStatus');
        //提升额度
        Route::post('/ApplyQuotaMessage','UserController@ApplyQuotaMessage');
    });
    //订单
    Route::group(['prefix'=>'order'],function(){
        //获取用户ip
        Route::get('getip','OrderController@getip');
        //用户全部订单
        Route::post('orderList','OrderController@order_list');
        //用户已完成订单
        Route::post('end_orderList','OrderController@end_list');
        //用户订单详情
        Route::post('DetailList','OrderController@DetailList');
        //用户已支付订单
        Route::post('pay_orderList','OrderController@pay_list');
        //用户未支付订单
        Route::post('notPay_orderList','OrderController@notPay_list');
    });

});